
char incomingByte ;
int switchState = 0;

void setup() {                
  
  pinMode(9, OUTPUT); 
  pinMode(10, OUTPUT);
  pinMode(11,INPUT);
  Serial.begin(9600);
 }


void loop() {
  
  switchState  = digitalRead(11);
  
   if (Serial.available() > 0) {
                
        incomingByte = Serial.read();
                 

                
        Serial.print("I received: ");
        Serial.println(incomingByte, DEC);
        switch (incomingByte) {
          case 'L':    
                digitalWrite( 9, HIGH);
                digitalWrite(10, HIGH);   // turn the LED on (HIGH is the voltage level)
                delay(1000);               // wait for a second
                digitalWrite(10, LOW);    // turn the LED off by making the voltage LOW
         
          case 'U':
                digitalWrite( 9, HIGH);
                delay(1000);
                digitalWrite(10, HIGH);   // turn the LED on (HIGH is the voltage level)
                delay(1000);               // wait for a second
                digitalWrite(10, LOW);    // turn the LED off by making the voltage LOW
                delay(1000); 
                digitalWrite(10, HIGH);   // turn the LED on (HIGH is the voltage level)
     
                 delay(1000);               // wait for a second
                digitalWrite(10, LOW);    // turn the LED off by making the voltage LOW
 
        }
   }
}

